package com.sizu.web;


import com.sizu.common.vo.ResultEntity;
import com.sizu.entity.TGoodstype;
import com.sizu.service.ITGoodstypeService;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import javax.xml.transform.Result;
import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author 赵玉玺
 * @since 2020-03-14
 */
@RestController
@RequestMapping("/inventory/tGoodstype")
public class TGoodstypeController {

    @Resource
    private ITGoodstypeService itGoodstypeService;

    /**
     * 返回商品类型树
     * @return
     */
    @RequestMapping("/tree")
    public ResultEntity tGoodstyleTree(){
        List<TGoodstype> styleTree = itGoodstypeService.getStyleTree();
        return ResultEntity.ok("查询成功",styleTree);
    }
}
